package com.tqjc.system.common.entity.BO;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @description: 物料库区扫描入参BO
 * @Author: 86195
 * @Date: 2024/1/19 17:53
 **/
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class MaterialParamBO implements Serializable {



    private String tag;

    private Long timeStamp;

    private Integer pointType;

    private Integer x1;

    private Integer x2;

    private Integer y1;

    private Integer y2;



    public String buildRedisKey(){

        StringBuilder sb = new StringBuilder();
        sb.append("{").append("\"tag\":").append("\"").append(this.getTag()).append("\",").append("\"timeStamp\":").append(this.getTimeStamp())
                .append("\"pointType\":").append(this.pointType).append("\"x1\":").append(this.getX1()).append("\"x2\":").append(this.getX2())
                .append("\"y1\":").append(this.getY1()).append("\"y2\":").append(this.getY2()).append("}");

        return sb.toString();

    }

}
